import java.util.*;


public class CycleRandom extends CardDrawing {
	
	private List <Integer> cycleList = new LinkedList<Integer>();
	
	
	public int getNextVocabId(int sizeVocab) {
		initializeCycleList(sizeVocab);
		return removeRandomFromCycleList();
	}
	
	private void initializeCycleList(int sizeVocab) {
		for (int i = 0 ; i<= sizeVocab ; i++) {
			cycleList.add(i);
		}
	}
	
	private int removeRandomFromCycleList() {
		int tmp = random(cycleList.size()-1);
		return cycleList.remove(tmp);
	}

}
